﻿Namespace Security
    Public Module ChannelUri
        Public Function Encryption(url As String) As String
            Dim str = ""
            For Each c In url.ToCharArray
                Dim s = AscW(c)
                str &= s.ToString("X4")
            Next
            Return str
        End Function

        Public Function Deciphering(url As String) As String
            Dim str = ""
            For i = 0 To url.Length / 4 - 1
                str &= ChrW(Short.Parse(url.Substring(i * 4, 4), Globalization.NumberStyles.HexNumber))
            Next
            Return str
        End Function
    End Module
End Namespace